let $axios = require('axios')
$axios.defaults.baseURL = 'http://localhost:8090/api'

/***
* @Description: 加载销售额报表数据
* @Param:
* @return:
* @Author: anqing.liang
* @Date: 2021/4/21
*/
export function $loadSaleDataSet(start,end){
  return new Promise((resolve, reject) => {
    $axios.get(`/statement/saleReport/data?start=${start}&end=${end}`).then(resp=>{
      if(resp&&resp.status==200){
        console.log(JSON.stringify(resp.data));
        resolve(resp.data);
      }
    })
  })
}
/***
* @Description: 加载员工个人报表数据
* @Param:
* @return:
* @Author: anqing.liang
* @Date: 2021/5/14
*/
export function $loadStaffSaleDataSet(start,end,account){
  return new Promise((resolve, reject) => {
    $axios.get(`/personal/saleReport/data?start=${start}&end=${end}&account=${account}`).then(resp=>{
      if(resp&&resp.status==200){
        resolve(resp.data);
      }
      reject(resp);
    })
  })
}
